//-----------------------------------------------------------------------
// <copyright file="RegistrationPublicationElement.cs" company="iron9light">
//      Copyright (c) iron9light. All rights reserved.
// </copyright>
// <author>iron9light</author>
//-----------------------------------------------------------------------

namespace EventBrokerExtension.Configuration
{
    using Microsoft.Practices.Unity;

    /// <summary>
    /// Configuration element for configuring registration publications.
    /// </summary>
    public class RegistrationPublicationElement : RegistrationMemberElement
    {
        /// <summary>
        /// Gets name of this element - used when calculating the collection key.
        /// </summary>
        public override string ElementName
        {
            get { return "publication"; }
        }

        /// <summary>
        /// Return the InjectionMember object represented by this configuration
        /// element.
        /// </summary>
        /// <returns>The injection member object.</returns>
        public override InjectionMember CreateInjectionMember()
        {
            return new RegistrationPublication(this.Name, this.EventTopic);
        }
    }
}